<!--
 * @Description: 描述
 * @Author: liym
 * @Date: 2025-05-12 19:34:37
 * @LastEditors: liym
 * @LastEditTime: 2025-06-06 16:56:43
-->
<template>
  <span class='logout' @click="handleLogout">
    退出登录
  </span>
</template>

<script>
export default {
  name: 'Logout',
  props: {},
  components: {},
  data () {
    return {}
  },
  computed: {},
  watch: {},
  methods: {
    handleLogout () {
      console.log('handleLogout')
      uni.showModal({
        title: '提示',
        content: '确定要退出登录吗？',
        success: (res) => {
          if (res.confirm) {
            // uni.clearStorageSync()
            uni.removeStorageSync('order')
            uni.removeStorageSync('user')
            uni.removeStorageSync('token')
            uni.reLaunch({
              url: '/pages/login/login'
            })
          }
        }
      })
    }
  },
  beforeCreate () {
  },
  created () {
  },
  beforeMount () {
  },
  mounted () {
  },
  beforeUpdate () {
  },
  updated () {
  },
  activated () {
  },
  deactivated () {
  },
  beforeDestroy () {
  },
  destroyed () {
  }
}
</script>

<style lang='scss' scoped>

</style>
